﻿using System;
using System.Linq.Expressions;
using élénkPróbája.assets;

namespace élénkPróbája.validators
{
    public class MinLengthValidator : LengthValidator
    {
        public MinLengthValidator(int min) : this(min, () => Messages.length_error)
        {

        }

        public MinLengthValidator(int min, Expression<Func<string>> errorMessageResourceSelector)
            : base(min, -1, errorMessageResourceSelector)
        {

        }

        public MinLengthValidator(Func<object, int> min)
            : this(min, () => Messages.length_error)
        {

        }

        public MinLengthValidator(Func<object, int> min, Expression<Func<string>> errorMessageResourceSelector)
            : base(min, obj => -1, errorMessageResourceSelector)
        {

        }
    }

}